import javax.swing.SwingUtilities;
public class SmartPen{
  public static void main(String[] args){
    int i = 0;
    String fileName = "Untitled";
    int initWidth = 1200;//default value
    int initHeight = 900;//default value
    int menuWidth = 200;//default value
    while (i < args.length){
      if (args[i].equals("-f")){
        fileName = args[i + 1];
        i += 1;
      }
      if (args[i].equals("-s") || args[i].equals("-wh")){
        initWidth = Integer.parseInt(args[i + 1]);
        initHeight = Integer.parseInt(args[i + 2]);
        i += 2;
      }
      if (args[i].equals("-m")){
        menuWidth = Integer.parseInt(args[i+1]);
        i += 1;
      }
      i++;
    }
    Easel myEasel = new Easel(fileName, initWidth, initHeight, menuWidth);
    SwingUtilities.invokeLater(myEasel);
  }
}
